Skip to content

library/spi_engine: SDO Extension upgrade #1808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

caosjr
Copy link
Contributor

@caosjr caosjr commented Jul 1, 2025

PR Description

Upgrade SPI engine to support up to 8 lanes. For that, a new register was inserted into Configuration Write Instruction, which is responsible for setting the lane mask. Each bit represents a lane.
This PR also removes register 8'h3b from the SPI Engine regmap.

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)
  • Documentation

PR Checklist

  • I have followed the code style guidelines
  • I have performed a self-review of changes
  • I have compiled all hdl projects and libraries affected by this PR
  • I have tested in hardware affected projects, at least on relevant boards
  • I have commented my code, at least hard-to-understand parts
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe files, Copyright etc)
  • I have not introduced new Warnings/Critical Warnings on compilation
  • I have added new hdl testbenches or updated existing ones

Copy link
Contributor

@LBFFilho LBFFilho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this seems headed in a nice direction, and thanks for also doing a lot of small fixes and improvements to the existing code along the way.

About the version: is this going to be a minor version or a major version bump? I understand that the removed register was not used anywhere (it was broken even), but technically we're breaking anything that relied on it. Also changing the behavior of the SDI & SDO FIFOs.

Also, please check timing on ad4052/de10nano just to be sure if it's all good.

@@ -69,7 +70,7 @@ module spi_engine_execution #(

input echo_sclk,
output reg sclk,
output reg sdo,
output reg [NUM_OF_SDI-1:0] sdo,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since now this applies to both sdi and sdo, please rename it to reflect the change.

@caosjr caosjr force-pushed the sdo_extension_spi_engine branch 3 times, most recently from 8a2552e to 15eaefd Compare July 4, 2025 14:44
@caosjr caosjr changed the title library/spi_engine: Extend SDO support for the SPI Engine library/spi_engine: SDO Extension upgrade Jul 7, 2025
caosjr added 2 commits July 8, 2025 19:36
* Extend SDO support to 8 (symmetrical with SDI support);
* Update SDI to use asymmetrical FIFO;
* Insert symmetrical FIFO for the SDO;
* Insert SPI lane mask configuration instruction to reg 2'b11;
* Insert offload active interface for interconnect and execution;
* Remove register 8'h3b from spi engine regmap.

Prefetching on offload work iff all lanes are active.

Signed-off-by: Carlos Souza <carlos.souza@analog.com>
* Update documentation to include the changes done
for supporting more than one SDO lane.
* Update the register map.

Signed-off-by: Carlos Souza <carlos.souza@analog.com>
@caosjr caosjr force-pushed the sdo_extension_spi_engine branch 4 times, most recently from 4300d4c to 6d23286 Compare July 10, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants